Images that are displayed on displays of computers and computerized devices typically are made up of a number of pixels. Each pixel usually has associated with it a color value. For example, with monochrome (black-and-white) pictures, a black pixel may have a value of one, while a white pixel may have a value of zero, such that the color of any pixel can be described with one bit, referred to as the color depth of the pixel. Non-monochrome—viz., color—pixels typically have a greater color depth, made of two, four, eight, or even more bits. For example, pixels that have a color depth of eight bits can take on any of 28=256 different colors.
For an image in a format known in the art as graphics-interchange format (GIF), the color value of each pixel is usually eight bits in length. The color value, however, does not refer to the color depth of the pixel, but instead specifically references a color palette, where each color may be described with a greater depth, such as sixteen, twenty-four, or even thirty-two bits in length. For example, a color value of 116 refers to color number 116 in the color palette, which may be a color that is actually twenty-four bits in length. The use of a color palette typically means that an image using such a palette, such as an image in GIF format, takes up less memory for storage and transmission purposes as compared to images not using a color palette.
Transparent images generally are those that have a portion of the pixels thereof that are meant to be transparent, such that when they are displayed against other images, the parts that are transparent allow any underlying background to be “seen through.” For example, an image of a doughnut-type shape may be such that the hole of the doughnut is transparent, such that if the image is displayed against a background, the background is visible within the hole of the doughnut. Usually, for images using color palettes, a palette color is selected as a transparent color. This means that this color can then be used to signify that a pixel of the image having a color value referring to this color is to be transparent when displayed against another image, for example.
A difficulty when displaying an image is that regardless of the shape of what can be considered the main part of the image, the image itself must be a rectangular area. Therefore, a rectangular box usually must be made to contain the shape of the image. Thus, most images in predetermined formats, such as the GIF format, are rectangular, even if the substance (that is, the main part) of the image is not rectangular in nature. For example, an image of an opaque disk may be rectangular in shape, where the parts of the image not corresponding to the disk itself are specified with pixels that are keyed to the predetermined transparent color within the color palette.
Displaying such images that have transparent pixels—that is, images that have pixels that are keyed to the predetermined transparent color within the palette—is commonly performed in current computer applications. For example, many Internet applications, such as browsing web sites using a browser program or browser operating system component, may frequently display images that have transparent pixels. This means that the performance of displaying such transparent images is important for the application itself to perform well. Techniques that improve such transparent image display performance are thus desirable. For this reason, as well as other reasons, there is a need for the present invention.